<include file="__PUBLIC__/_header" />
<script src="__APP_SKIN__js/index_1.js?25"></script>
<body>
<!--头部开始-->
<include file="__PUBLIC__/_nav" />
<!--头部结束-->
<style>
    .indexwrap .box ul.ul1 li h1{
        height:auto;
    }
</style>
<!--主体开始-->
<div class="index_banner">
    <div class="bannerbox" style="overflow: visible" id="index">
        <div class="allShop">
            <div class="all">全部商品分类</div>
            <ul class="hsort">

                <include file="__PUBLIC__/_header_title" />
            </ul>
        </div>

        <div id="focus" class="index_flash">
            <div class="swiper-container h-swiper-container">
                <div class="swiper-wrapper swiper">
                    <volist name="advert_info" id="adi">
                        <div class="swiper-slide">
                            <if condition="$adi.type eq 2 ">
                                <a href="{:BaseController::_createUrl('index/detail')}/kid/{$adi.item_no}">
                                    <img src="{:BaseController::getConfig('file_server_url')}/2013/{$adi.image}" width="229" height="229" onerror="this.src='__APP_SKIN__images/fault.jpg'" original="__APP_SKIN__images/fault.jpg">
                                </a>
                                <else/>
                                <a href="{$adi.url}">
                                    <img src="{:BaseController::getConfig('file_server_url')}/2013/{$adi.image}"  width="229" height="229"  onerror="this.src='__APP_SKIN__images/fault.jpg'" original="__APP_SKIN__images/fault.jpg">
                                </a>
                            </if>
                       </div>

                    </volist>
                    <!--<div class="swiper-slide">slider1</div>-->
                    <!--<div class="swiper-slide">slider2</div>-->
                    <!--<div class="swiper-slide">slider3</div>-->
                </div>
                <div class="swiper-pagination swiper-pagination-bullets"></div>

            </div>
        </div>
    </div>
</div>

<div class="indexwrap">
    <div class="box">
        <div class="TabTitle L_TabTitle2">
            <ul id="mid1">
                <volist name="hot_tabs" id="v">
                    <if condition="$i eq 1">
                        <li onclick="nTabs(this, {$i});" class="active">{$v.title}</li>
                        <else/>
                        <li  onclick="nTabs(this, {$i});" >{$v.title}<font  color=red>【促销商品点这里】</b></li>
                    </if>
                </volist>
            </ul>
        </div>
        <div class="content">
            <volist name="hot_tabs" key="j" id="v">
                <div id="mid1_Content_{$j}" <if condition="$j eq 1"> style="display: block" <else/> style="display: none" </if>>
                    <ul class="ul1">
                        <volist name="v[data]" id="vo">
                            <li style="position:relative;clear:right">
                                <div class="picture">
                                    <div class="cu_big_pic"></div>
									<if condition="!empty($vo[m_deliver_limit_time])">
										<a href="{:BaseController::_createUrl('index/detail')}/kid/{$vo.item_no}/do_sale/1">
									<else/>
										<a href="{:BaseController::_createUrl('index/detail')}/kid/{$vo.item_no}">
									</if>		
                                        <img src="/data/product/{$vo.item_no}.jpg" onerror="this.src='__APP_SKIN__images/fault.jpg'" original="__APP_SKIN__images/fault.jpg" > 
                                    </a>                                   
                                    <h2>批发价：{$vo|getProductSalePriceByUserType=0} 元 </h2>
                                    <h2>零售价：{$vo.sale_price|round=2}元 </h2>
									<h3>单位：{$vo.unit_no}</h3>
									<h3>整件规格：{$vo.item_size}</h3>
									<h3>配送规格：{$vo.chasedo_spec|round=2} </h3>
									<if condition="!empty($vo[m_deliver_limit_time])">
									<h3 style="color:red" >促销价:{$vo.current_price} 元</h3>
									<h3 style="color:red" class="limit_time" data-time="{$vo.m_deliver_limit_time}"></h3>
									</if>
									<h3>库存:
									<if condition="$vo['stock_qty'] lt 0 or $vo['stock_qty'] eq 0">
										无货{$vo.stock_qty}无货
										<else/>
										有货
									</if>	
									
									</h3>
                                    <h1 title="{$vo.m_desc|default=$vo['m_name']}">
                                        <p><a href="#">{$vo.item_name}</a></p>
                                    </h1>
									<span style="color:#555">{$vo|getProductRefundTitle}</span>
                                    <div class="bottom">
                                        <div class="erp">条码：{$vo.item_no}</div>
										<if condition="$j neq 1">
										<div style="position:absolute;bottom:0;right:10px" class="ording" onclick="addCart('{$vo.item_no}',{$vo.chasedo_spec|round=2},{$vo.current_price})">
										<else/>
                                        <div style="position:absolute;bottom:0;right:10px" class="ording" onclick="addCart('{$vo.item_no}',{$vo.chasedo_spec|round=2},{$vo|getProductSalePriceByUserType})">
										</if>
                                            <a href="javascript:void(0)" id="btnBuy_{$vo.item_no}" class="buy"></a>
                                            <if condition="$vo.cart_total gt 0">
                                                <span class="circular circular_{$vo.item_no}" >{$vo.cart_total}</span>
                                                <else/>
                                                 <span class="circular circular_{$vo.item_no}" >0<span>
                                            </if>
                                        </div>
                                    </div>
                                </div>
                            </li>
                        </volist>
                    </ul>
                </div>
            </volist>
        </div>
    </div>
</div>
<!--主体结束-->

<input type="hidden" value="{:BaseController::getConfig('file_server_url')}/2013/" id="ad_img">
<input type="hidden" value="{:BaseController::_createUrl('index/classification')}/kid/" id="classification">
<input type="hidden" value="{:BaseController::_createUrl('index/detail')}/kid/" id="detail_url">

<div class="footer">
    <!--<p>版权所有 Copyright(C)2014  QCYIJIA.COM 贵州黔城壹家贸易有限公司 黔ICP备15001461号  </p>-->
    <!-- <p>百度信誉档案编号: BDV-企GZA14THBRZ2</p>-->
</div>

</body>
<script>
    $(function(){
        var imgName=$("#ad_img").val();
        var hidden_url = $("#classification").val();
        var detail_url=$("#detail_url").val();
        var hidden_img=$("#hidden_img").val();
        var mySwiper = new Swiper('.h-swiper-container', {
            pagination : '.swiper-pagination',
            autoplay: 3000
        })
//        indexHttpHelper.getAdvertList($(".swiper"),imgName,detail_url,hidden_img);
//        indexHttpHelper.getFirstKind($(".hsort"),'',hidden_url);

        ComputedPayHeight();
        var msg = '{:str_replace("\n", "", $item_msg["notice_content"])}';//"{$item_msg.notice_content}";//
        var id = "{$item_msg.id}";
        var user_id = {:LoginHelper::getUserId()};
        //TODO 消息提示,通过消息类型来控制，重要消息弹出来
        if(msg){
           var op= layer.open({
                title: '温馨提示',
                content: msg,
                yes:function(){
                    $.ajax({
                        url: configs.s_url+"pcorder/index/readNotice",
                        type: "post",
                        data: { "id": id ,"user_id":user_id},
                        success: function (json) {

                        }
                    });  layer.close( op);
                }
            });
        }

        $(".maintop .left .meun a").eq(0).addClass("active");
    })
	function GetRTime(){
		$(".limit_time").each(function(i,v){
				var EndTime= new Date($(v).attr("data-time")); //截止时间 前端路上 http://www.51xuediannao.com/qd63/
				var NowTime = new Date();
				var t =EndTime.getTime() - NowTime.getTime();
				var d=Math.floor(t/1000/60/60/24);
				var h=Math.floor(t/1000/60/60%24);
				var m=Math.floor(t/1000/60%60);
				var s=Math.floor(t/1000%60);
				$(v).html("还剩:"+d + "天"+h + "时"+m + "分"+s + "秒");
			});
	}
	setInterval(GetRTime,1000);
</script>
</html>
